/**
 * 侧边栏文章目录
 */
#sidebar-directory {

  .body-open-folder & {
    left: 330px;
    border-left: 1px solid #1e1e1e;
    box-sizing: border-box;
  }

  .item {
    height: calc(~'100vh - 48px');
    overflow: auto;
  }

  .toc {
    ul {
      margin: 0;
      padding: 0;
    }

    a {
      height: 32px;
      line-height: 32px;
      padding: 0 16px;
      text-decoration: none;
      color: #fff;
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;

      &:hover,
      &.active {
        background-color: rgba(255,255,255,.08);
      }

      &.active {
        font-weight: 700;
      }
    }
  }

  .body-open-folder.mdui-theme-layout-light & {
    border-left-color: #fff;
  }

  .mdui-theme-layout-light & {
    .toc {
      a {
        color: rgba(0, 0, 0, 0.87);

        &:hover,
        &.active {
          background-color: rgba(0, 0, 0, .08);
        }
      }
    }
  }
}


#sidebar-directory {
  .toc {
    ul>li {
      .loop(@counter) when (@counter < 100) {
        &>ul>li {
          .loop(@counter + 1);
          &>a {
            padding-left: (16px + 16px * @counter) !important;
          }
        }
      }
      .loop(1);
    }
  }
}
